// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'



//引入iview组件
import iView from 'iview';
import 'iview/dist/styles/iview.css';
Vue.use(iView);
//引入vue-easytable
import 'vue-easytable/libs/themes-base/index.css'
import {VTable,VPagination} from 'vue-easytable'
Vue.component(VTable.name,VTable)
Vue.component(VPagination.name,VPagination) 
//引入axios
import axios from 'axios'
Vue.prototype.$ajax = axios
//可以保证动态的匹配生产和开发的定义前缀,区分生产和开发环境
// import apiConfig from '../config/api.config'
// import Axios from 'axios'
// import VueAxios from 'vue-axios'
// Vue.use(VueAxios, Axios)
// Axios.defaults.baseURL = apiConfig.baseUrl

//默认配置withCredentials改为true，就可以允许跨域携带session信息
//这样每次发送ajax请求后，只要不关闭浏览器，得到的session数据都是一致的

// axios.defaults.withCredentials=true;
// Vue.config.productionTip = false

// axios.defaults.baseURL = '/api'

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
